package com.tony.guice.Common;

import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.tony.guice.BindAnnotations.BindAnno;

/**
 * @version V1.0  </br>
 * @ClassName RealBillingService </br>
 * @Description TODO  </br>
 * @Author tonywang</br>
 * @DATE 2/28/2019 4:00 PM</br>
 */
public class RealBillingService implements BillingService {
    public TransactionLog mTransactionLog;
    @Override
    public void say() {
        System.out.println("this is realBill.");
        this.mTransactionLog.log();
    }
    @Inject
    RealBillingService(@Named("test") TransactionLog pTransactionLog, String name){}
    RealBillingService(@BindAnno TransactionLog pTransactionLog){
        this.mTransactionLog = pTransactionLog;
    }

    @NotOnWeekends
    public void notOnWeekends(){
        System.out.println("not on weekends");
    }
}
